package cn.jaye.fabric.domain.service;

import cn.jaye.fabric.common.constants.mapping.Table;
import cn.jaye.fabric.domain.model.Org;
import cn.jaye.fabric.domain.repository.OrgRepository;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Jaye
 * @create 2018-05-16 16:32
 */
@Service
public class OrgService {

    @Autowired
    private OrgRepository orgRepository;

    public Org getOrg(String orgId) {
        return orgRepository.selectOne(new EntityWrapper<Org>().eq(Table.Org.orgId.getFieldValue(), orgId));
    }
}
